package com.person.controller;

import com.person.common.CommonResult;
import com.sun.jmx.snmp.daemon.CommunicatorServer;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.UUID;

@RestController
@RequestMapping("/zookeeper8004")
public class MyPayMentController {
    @Resource
    private DiscoveryClient discoveryClient;
    // sdsfdsa
    @GetMapping("/find/{id}")
    public CommonResult get(@PathVariable("id") String id){
        List<String> services = discoveryClient.getServices();
        System.out.println(services);
        return CommonResult.ok(200,"success", UUID.randomUUID());
    }
}
